package com.frame.work.common.util;

import com.frame.work.config.SpringUtil;
import com.frame.work.mqtt.data.handle.MqttDataHandle;

/**
 * @author wjming
 */
public class JsonToMqtt {

    public static void sendMQTT(String gatewayMac, String json) {
        //将数据发送到mqtt队列中
        MqttDataHandle mqttDataHandle = SpringUtil.getBean(MqttDataHandle.class);
        mqttDataHandle.mqttPush(gatewayMac, json);
    }

    public static void actionHandleNoMqtt(String gatewayMac, String json) {
        //将数据发送到mqtt队列中
        MqttDataHandle mqttDataHandle = SpringUtil.getBean(MqttDataHandle.class);
        mqttDataHandle.actionHandle(gatewayMac, json);
    }

    public static void sendBaseMQTT(String gatewayMac, String json) {
        //将数据发送到mqtt队列中
        MqttDataHandle mqttDataHandle = SpringUtil.getBean(MqttDataHandle.class);
        mqttDataHandle.basePush(gatewayMac, json);
    }

    public static void mqttPushLianKongNew(String gatewayMac, String json) {
        //将数据发送到mqtt队列中
        MqttDataHandle mqttDataHandle = SpringUtil.getBean(MqttDataHandle.class);
        mqttDataHandle.mqttPushLianKong_new(gatewayMac, json);
    }

    public static void mqttLianKongDevice(String gatewayMac, String json) {
        //将数据发送到mqtt队列中
        MqttDataHandle mqttDataHandle = SpringUtil.getBean(MqttDataHandle.class);
        mqttDataHandle.mqttPushLianKong(gatewayMac, json);
    }

    public static void mqttLianpushScene(String gatewayMac, String json) {
        //将数据发送到mqtt队列中
        MqttDataHandle mqttDataHandle = SpringUtil.getBean(MqttDataHandle.class);
        mqttDataHandle.pushScene(gatewayMac, json);
    }
}
